﻿using Newtonsoft.Json;
using Prism.Commands;
using Prism.Mvvm;

namespace Newtonsoft.ViewModelBase
{
    /// <summary>
    /// 基础ViewModel
    /// </summary>
    public class BaseViewModel : BindableBase
    {
        /// <summary>
        /// 页面初始化命令，需要行为触发
        /// </summary>
        [JsonIgnore]
        public DelegateCommand OnViewLoadedCommand => new DelegateCommand(() => OnViewLoaded());

        /// <summary>
        /// 初始化
        /// </summary>
        protected virtual void OnViewLoaded()
        {

        }
    }
}
